Kameleon-Plus  0.3.2
Fieldline.h
Go to the documentation of this file.
1 /*
2  * Fieldline.h
3  *
4  * Created on: Jul 16, 2009
5  * Author: dberrios
6  */
7 
8 #ifndef CCMC_FIELDLINE_H_
9 #define CCMC_FIELDLINE_H_
10 
11 #include "Point3f.h"
12 #include "Vector.h"
13 #include <vector>
14 
15 namespace ccmc
16 {
20  class Fieldline
21  {
22  public:
23  Fieldline();
24  Fieldline(int initialSize);
25  ~Fieldline();
26  void insertPointData(const Point3f& p, const float& d);
27  void insertVectorData(const Point3f& vector);
28  void removePoint(int index);
30  void reverseOrderInPlace();
31  const std::vector< Point3f >& getPositions();
32  const std::vector< float >& getData();
33  int size();
34  const Point3f& getPosition(int i);
35  float getData(int i);
37  int getStartIndex();
38  void reserve(int size);
39  void setStartPoint(Point3f p);
40  void setStartIndex(int index);
41  void setVariable(std::string variable);
42  const std::string& getVariable();
43  const std::vector< float>& getDs(); // requires positions
44  const std::vector< Point3f >& getElements(); // requires elements
45  const Point3f& getElement(int i); // requires elements
46  const std::vector< float>& integrate();// requires elementsMagnitudes, values
47  const std::vector< float>& integrateVector();
48  const std::vector< float>& derivative();// requires elementsMagnitudes, values
49  const std::vector< float>& measure(); // requires elementsMagnitudes
50  float getLength(int i); // requires length
51  float getIntegral(int i); // requires integral
52  Fieldline interpolate(int option, int Npoints); // requires positions, length, integral
53  const std::vector< int >& getNearest();
54  const std::vector< float>& getTlocal();
55  void minmax();
56  int mincount; // set by minmax()
57  int maxcount; //
58  std::vector < int> minima; //filled by minmax()
59  std::vector < int> maxima;
60  int GlobMinIndex; // see minmax
62 
63 
64  private:
65  std::vector < Point3f > positions;
66  std::vector < float > values;
67  std::vector < Point3f > vectorValues;
68  Point3f startPoint;
69  int startIndex;
70  std::string variable;
71  std::vector < Point3f > elements; // created by getDs()
72  std::vector < float> elementsMagnitudes; // created by getDs()
73  std::vector < float> integral; // created by integrate()
74  std::vector < float> vectorIntegral;
75  std::vector < float> dds; // created by derivative()
76  std::vector < float> length; // created by measure()
77  std::vector < int> nearest; // created by interpolate
78  std::vector < float> tlocal; // created by interpolate
79 
80  };
81 }
82 
83 #endif /* CCMC_FIELDLINE_H_ */